package uk.co.droidinactu.inlibrislibertas.contentprovider;

import uk.co.droidinactu.inlibrislibertas.model.Author;
import uk.co.droidinactu.inlibrislibertas.model.AuthorEbookLink;
import uk.co.droidinactu.inlibrislibertas.model.EBook;
import uk.co.droidinactu.inlibrislibertas.model.Tag;
import uk.co.droidinactu.inlibrislibertas.model.TagEbookLink;
import android.net.Uri;
import android.provider.BaseColumns;

public class InLibrisLibertasData {
    /**
     * AuthorBookLink table contract
     */
    public static final class AuthorBookLink implements BaseColumns {

        /**
         * The table name offered by this provider
         */
        public static final String TABLE_NAME = AuthorEbookLink.DATABASE_TABLE_NAME;

        /**
         * The scheme part for this provider's URI
         */
        private static final String SCHEME = "content://";

        /**
         * Path part for the Author URI
         */
        private static final String PATH_AUTHORBOOKLINKS = "/authorbooklink";

        /**
         * Path part for the Author ID URI
         */
        private static final String PATH_AUTHORBOOKLINKS_ID = "/authorbooklink/";

        /**
         * 0-relative position of an EBook ID segment in the path part of an
         * Author ID URI
         */
        public static final int AUTHORBOOKLINK_ID_PATH_POSITION = 1;

        /**
         * The content:// style URL for this table
         */
        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_AUTHORBOOKLINKS);

        /**
         * The content URI base for a single Author. Callers must append a
         * numeric Author id to this Uri to retrieve a single EBook
         */
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_AUTHORBOOKLINKS_ID);

        /**
         * The content URI match pattern for a single Author, specified by its
         * ID. Use this to match incoming URIs or to construct an Intent.
         */
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_AUTHORBOOKLINKS_ID + "/#");

        /**
         * The MIME type of {@link #CONTENT_URI} providing a directory of
         * Author.
         */
        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/com.eads.minimrms.mobileclient.authorbooklink";

        /**
         * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
         * Author.
         */
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/uk.co.droidinactu.inlibrislibertas.contentprovider.authorbooklink";

        /**
         * The default sort order for this table
         */
        public static final String DEFAULT_SORT_ORDER = AuthorEbookLink.FIELD_NAME_EBOOK_ID + " ASC";

        // This class cannot be instantiated
        private AuthorBookLink() {
        }
    }

    /**
     * Author table contract
     */
    public static final class Authors implements BaseColumns {

        /**
         * The table name offered by this provider
         */
        public static final String TABLE_NAME = Author.DATABASE_TABLE_NAME;

        /**
         * The scheme part for this provider's URI
         */
        private static final String SCHEME = "content://";

        /**
         * Path part for the Author URI
         */
        private static final String PATH_AUTHORS = "/authors";

        /**
         * Path part for the Author ID URI
         */
        private static final String PATH_AUTHORS_ID = "/authors/";

        /**
         * 0-relative position of an EBook ID segment in the path part of an
         * Author ID URI
         */
        public static final int AUTHORS_ID_PATH_POSITION = 1;

        /**
         * Path part for the Live Folder URI
         */
        private static final String PATH_LIVE_FOLDER = "/live_folders/authors";

        /**
         * The content:// style URL for this table
         */
        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_AUTHORS);

        /**
         * The content URI base for a single Author. Callers must append a
         * numeric Author id to this Uri to retrieve a single EBook
         */
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_AUTHORS_ID);

        /**
         * The content URI match pattern for a single Author, specified by its
         * ID. Use this to match incoming URIs or to construct an Intent.
         */
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_AUTHORS_ID + "/#");

        /**
         * The content Uri pattern for a Author listing for live folders
         */
        public static final Uri LIVE_FOLDER_URI = Uri.parse(SCHEME + AUTHORITY + PATH_LIVE_FOLDER);

        /**
         * The MIME type of {@link #CONTENT_URI} providing a directory of
         * Author.
         */
        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/com.eads.minimrms.mobileclient.author";

        /**
         * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
         * Author.
         */
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/uk.co.droidinactu.inlibrislibertas.contentprovider.author";

        /**
         * The default sort order for this table
         */
        public static final String DEFAULT_SORT_ORDER = Author.FIELD_NAME_AUTHOR_NAME + " ASC";

        // This class cannot be instantiated
        private Authors() {
        }
    }

    /**
     * EBook table contract
     */
    public static final class EBooks implements BaseColumns {

        /**
         * The table name offered by this provider
         */
        public static final String TABLE_NAME = EBook.DATABASE_TABLE_NAME;

        /**
         * The scheme part for this provider's URI
         */
        private static final String SCHEME = "content://";

        /**
         * Path part for the EBooks URI
         */
        private static final String PATH_EBOOKS = "/ebooks";

        /**
         * Path part for the Ebook ID URI
         */
        private static final String PATH_EBOOKS_ID = "/ebooks/";

        /**
         * Path part for the Ebook ID URI
         */
        private static final String PATH_EBOOKS_RECENT = "/recentebook";

        /**
         * 0-relative position of an EBook ID segment in the path part of an
         * Ebook ID URI
         */
        public static final int EBOOKS_ID_PATH_POSITION = 1;

        /**
         * Path part for the Live Folder URI
         */
        private static final String PATH_LIVE_FOLDER = "/live_folders/ebooks";

        /**
         * The content:// style URL for this table
         */
        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_EBOOKS);

        /**
         * The content URI base for a single EBook. Callers must append a
         * numeric ebook id to this Uri to retrieve a single EBook
         */
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_EBOOKS_ID);

        /**
         * The content URI match pattern for a single EBook, specified by its
         * ID. Use this to match incoming URIs or to construct an Intent.
         */
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_EBOOKS_ID + "/#");

        /**
         * The content URI match pattern for a single EBook, specified by its
         * ID. Use this to match incoming URIs or to construct an Intent.
         */
        public static final Uri CONTENT_RECENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_EBOOKS_RECENT);

        /**
         * The content Uri pattern for a notes listing for live folders
         */
        public static final Uri LIVE_FOLDER_URI = Uri.parse(SCHEME + AUTHORITY + PATH_LIVE_FOLDER);

        /**
         * The MIME type of {@link #CONTENT_URI} providing a directory of
         * EBooks.
         */
        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/com.eads.minimrms.mobileclient.ebook";

        /**
         * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
         * EBook.
         */
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/uk.co.droidinactu.inlibrislibertas.contentprovider.ebook";

        /**
         * The default sort order for this table
         */
        public static final String DEFAULT_SORT_ORDER = EBook.FIELD_NAME_BOOK_TITLE + " ASC";

        // This class cannot be instantiated
        private EBooks() {
        }

    }

    /**
     * AuthorBookLink table contract
     */
    public static final class TagBookLink implements BaseColumns {

        /**
         * The table name offered by this provider
         */
        public static final String TABLE_NAME = TagEbookLink.DATABASE_TABLE_NAME;

        /**
         * The scheme part for this provider's URI
         */
        private static final String SCHEME = "content://";

        /**
         * Path part for the Author URI
         */
        private static final String PATH_TAGBOOKLINKS = "/tagbooklink";

        /**
         * Path part for the Author ID URI
         */
        private static final String PATH_TAGBOOKLINKS_ID = "/tagbooklink/";

        /**
         * 0-relative position of an EBook ID segment in the path part of an
         * Author ID URI
         */
        public static final int TAGBOOKLINK_ID_PATH_POSITION = 1;

        /**
         * The content:// style URL for this table
         */
        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_TAGBOOKLINKS);

        /**
         * The content URI base for a single Author. Callers must append a
         * numeric Author id to this Uri to retrieve a single EBook
         */
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_TAGBOOKLINKS_ID);

        /**
         * The content URI match pattern for a single Author, specified by its
         * ID. Use this to match incoming URIs or to construct an Intent.
         */
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_TAGBOOKLINKS_ID + "/#");

        /**
         * The MIME type of {@link #CONTENT_URI} providing a directory of
         * Author.
         */
        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/com.eads.minimrms.mobileclient.tagbooklink";

        /**
         * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
         * Author.
         */
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/uk.co.droidinactu.inlibrislibertas.contentprovider.tagbooklink";

        /**
         * The default sort order for this table
         */
        public static final String DEFAULT_SORT_ORDER = TagEbookLink.FIELD_NAME_EBOOK_ID + " ASC";

        // This class cannot be instantiated
        private TagBookLink() {
        }
    }

    /**
     * Tag table contract
     */
    public static final class Tags implements BaseColumns {

        /**
         * The table name offered by this provider
         */
        public static final String TABLE_NAME = Tag.DATABASE_TABLE_NAME;

        /**
         * The scheme part for this provider's URI
         */
        private static final String SCHEME = "content://";

        /**
         * Path part for the Author URI
         */
        private static final String PATH_TAGS = "/tags";

        /**
         * Path part for the Author ID URI
         */
        private static final String PATH_TAGS_ID = "/tags/";

        /**
         * 0-relative position of an EBook ID segment in the path part of an
         * Author ID URI
         */
        public static final int TAGS_ID_PATH_POSITION = 1;

        /**
         * Path part for the Live Folder URI
         */
        private static final String PATH_LIVE_FOLDER = "/live_folders/authors";

        /**
         * The content:// style URL for this table
         */
        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_TAGS);

        /**
         * The content URI base for a single Author. Callers must append a
         * numeric Author id to this Uri to retrieve a single EBook
         */
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_TAGS_ID);

        /**
         * The content URI match pattern for a single Author, specified by its
         * ID. Use this to match incoming URIs or to construct an Intent.
         */
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_TAGS_ID + "/#");

        /**
         * The content Uri pattern for a Author listing for live folders
         */
        public static final Uri LIVE_FOLDER_URI = Uri.parse(SCHEME + AUTHORITY + PATH_LIVE_FOLDER);

        /**
         * The MIME type of {@link #CONTENT_URI} providing a directory of
         * Author.
         */
        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/com.eads.minimrms.mobileclient.author";

        /**
         * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
         * Author.
         */
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/uk.co.droidinactu.inlibrislibertas.contentprovider.author";

        /**
         * The default sort order for this table
         */
        public static final String DEFAULT_SORT_ORDER = Tag.FIELD_NAME_TAG_NAME + " ASC";

        // This class cannot be instantiated
        private Tags() {
        }
    }

    public static final String AUTHORITY = "uk.co.droidinactu.inlibrislibertas.contentprovider";

    // This class cannot be instantiated
    private InLibrisLibertasData() {
    }

}
